package com.haircut.project.vo.record;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.List;

@Setter
@Getter
public class ApiRecordVo {
    /**
     * id
     */
    @ApiModelProperty("id")
    private String id;
    /**
     * 客户姓名
     */
    @ApiModelProperty("客户姓名")
    @NotBlank(message = "客户姓名不能为空")
    @Length(min = 1,max = 20,message = "客户姓名不能超过20")
    private String custName;

    /**
     * 优惠金额
     */
    @ApiModelProperty("优惠金额")
    @DecimalMin(value = "0",message = "优惠金额必须大于0")
    @DecimalMax(value = "999999.99",message = "优惠金额不能大于999999.99")
    private BigDecimal discountAmount;
    /**
     * 总现金金额
     */
    @ApiModelProperty("总现金金额")
    @DecimalMin(value = "0",message = "总现金金额必须大于0")
    @DecimalMax(value = "999999.99",message = "总现金金额不能大于999999.99")
    private BigDecimal totalCashAmount;
    /**
     * 总刷卡金额
     */
    @ApiModelProperty("总刷卡金额")
    @DecimalMin(value = "0",message = "总刷卡金额必须大于0")
    @DecimalMax(value = "999999.99",message = "总刷卡金额不能大于999999.99")
    private BigDecimal totalCardAmount;


    /**
     * 备注
     */
    @ApiModelProperty("备注")
    @Length(max = 100,message = "备注最多只能输入100个字符")
    private String recordRemark;

    /**
     * 备注
     */
    @ApiModelProperty("刷卡说明")
    @Length(max = 100,message = "刷卡说明最多只能输入100个字符")
    private String cardRemark;

    @NotNull(message = "必须添加项目")
    @Size(min = 1,message = "项目最少添加一个")
    private List<ApiRecordProjectVo> projects;

}
